
// $(function(){
//   var dialog=function(){
//       this.defaultOption={
//           msg:"",
//           fun:"",
//           cityName:"",
//       }
    
//   }


  function dialog(){
		this.oLogin = null;
		this.defaultOption = {//????
			w:300,
			h:300,
			dir:'center',
			msg:'',
			fun:''
		}
	}
  dialog.prototype.init=function(opt){
      extend(this.defaultOption,opt);
  this.create();
  this.fnClose();
  this.setCity();
  }
  dialog.prototype.fnClose = function(){
      $(".ctrl-btn-cancal").click(function(){
          $("#dialog-bg").remove();
      })
  }
  dialog.prototype.create= function(){
        //fun = "'" + fun + "(" + JSON.stringify(param) + ")'"
      var temp='<div id="dialog-bg"><div id="dialog-wrap"><div class="dialog-content under-line"><span>' + this.defaultOption.msg + '</span></div><div class="ctrl-btn"><span class="ctrl-btn-cancel">??</span><span '+this.defaultOption.fun+'>??</span></div></div></div>';
      $("body").append(temp);
  }
  dialog.prototype.setCity=function(){
     // myStorage.setItem("location_data", cityName);
      //$(".location_city").html(cityName);
      this.fnClose();
  }
  function extend(obj1,obj2){
  for(var attr in obj2){
    obj1[attr] = obj2[attr];
  }
}

// }(window))
